﻿using FluentValidation;
using netCoreStudy.Dto;
using netCoreStudy.IService;

namespace netCoreStudy.DtoValidator
{
	public class UpdateMaterialValidator : AbstractValidator<UpdateMaterialDto>
	{
		public UpdateMaterialValidator(IMaterialService userService)
		{
			RuleFor(x => x.Name)
				.NotNull()
				.NotEmpty()
				.WithName("文件名")
				.WithMessage("{PropertyName}不能为空!")
				;
		}
	}
}